package org.xqyy.eval.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.xqyy.eval.dao.IGradeScoreDao;
import org.xqyy.eval.service.IGradeScoreService;

import java.util.List;
import java.util.Map;

/**
 * Created by luoxiaoming on 16-12-25.
 */
@Component
@Transactional(readOnly = true)
public class GradeScoreService implements IGradeScoreService {

    @Autowired
    private IGradeScoreDao gradeScoreDao;


    @Override
    @Transactional(isolation = Isolation.DEFAULT, propagation = Propagation.REQUIRED, readOnly = false)
    public void add(Map<String, Object> params) {
        gradeScoreDao.add(params);
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT, propagation = Propagation.REQUIRED, readOnly = false)
    public void modify(Map<String, Object> params) {
        gradeScoreDao.modify(params);
    }

    @Override
    @Transactional(isolation = Isolation.DEFAULT, propagation = Propagation.REQUIRED, readOnly = false)
    public void delete(Map<String, Object> params) {
        gradeScoreDao.delete(params);
    }

    @Override
    public List<Map<String, Object>> load(Map<String, Object> params) {
        return gradeScoreDao.load(params);
    }
}
